package com.isoft.common.job;

import java.util.Date;

import org.apache.commons.lang.time.FastDateFormat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.isoft.bean.GirlProperties;

/**
 * 
 * @Author yigeyanse@hotmail.com
 * @Date 2017年9月6日 上午11:32:40
 */
@Component
public class GirlProcesser implements IProcesser {

	@Autowired
	private GirlProperties girlProperties;

	public final static long SECOND = 1 * 1000;
	FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");

	@Override
	@Scheduled(fixedRate = SECOND * 10) // 固定间隔时间 @Scheduled(fixedRate = 时间间隔 )
	public void process() {
		if (!girlProperties.isOpenProcessor())
			return;
		System.out.println("[GirlProcesser]:" + fdf.format(new Date()));
	}
}
